import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取C端用户列表*/
export const getUserList = (params: { page: number, pageSize: number }) => {
    return request({
        url: '/api/v2/admin/getUser',
        method: 'get',
        params
    })
} 

/**添加C端用户*/
export const addUserInfo = (data: addFormData ) => request({
    url: '/api/v2/admin/addUser',
    method: 'post',
    data
}) 

/**删除C端用户*/
export const deleteUserInfo = (data: { ID: string }) => request({
    url: '/api/v2/admin/delUser',
    method: 'post',
    data
})

/**更新C端用户信息*/
export const updateUserInfo = (data: editFormData) => request({
    url: '/api/v2/admin/updateUser',
    method: 'post',
    data
})